package controllers

import (
	"github.com/gin-gonic/gin"
	"go.uber.org/zap"
	"purchase-mall/services"
)

// PeakValueHandler 近三天请求峰值
func PeakValueHandler(c *gin.Context) {
	data, err := services.GetPeakValueService()
	if err != nil {
		zap.L().Error("services.GetPeakValueService() failed", zap.Error(err))
		ResponseError(c, CodeServerBusy)
		return
	}
	ResponseSuccess(c, data)
}
